package com.hundsun.cprs.yyt.service.goods.dao;

import org.apache.ibatis.annotations.Param;

import com.hundsun.cprs.yyt.service.goods.domain.GoodsWithArea;
import com.hundsun.cprs.yyt.service.goods.dto.GoodsAreaInfo;

public interface GoodsWithAreaDao {
    int deleteByPrimaryKey(Integer id);

    int insert(GoodsWithArea record);

    int insertSelective(GoodsWithArea record);

    GoodsAreaInfo selectByPrimaryKey(Integer id);
    
    GoodsAreaInfo selectByAreaCodeAndGoodsId(@Param("areaCode") String areaCode,@Param("goodsId") Integer goodsId);

    int updateByPrimaryKeySelective(GoodsWithArea record);

    int updateByPrimaryKey(GoodsWithArea record);

    int updateByGoodsIdAndAreaCode(GoodsWithArea goodsWithArea);

    /**
     * 此方法用于校验商品是否已上架
     *
     * */
    int goodsCount(Integer goodsId);
}